CREATE TRIGGER TGTG_01 ON TACGIA 
INSTEAD OF DELETE
AS
BEGIN
	DECLARE @MATG VARCHAR(15)
	SET @MATG = (SELECT MATACGIA FROM deleted)
	DELETE FROM SachTacGia WHERE MaTacGia = @MATG
	DELETE FROM TacGia WHERE MaTacGia = @MATG
	RAISERROR('XOA TAC GIA THANH CONG',16,1)
END